Hi Shantanu,
I made a quick test environment.
- From the Jenkins side, with a new user token and a new job.
- From Rundeck, I created a new job with a script step with the following content:
curl -vvv -X POST http://admin:11bd72f1f22653cf7158c7961f60476a1d@localhost:8080/job/MyJenkinsJob/build
The format is the same as the Google Group post:
http://user:JENKINS_USER_TOKEN@localhost:8080/job/TestJob/build
Basically is the same way of calling any endpoint using the cURL tool.
Here is the job definition example (you can import job definitions to your instance following this).
- defaultTab: nodes
description: ''
executionEnabled: true
id: 1fa2923a-5b1d-4ea2-97d1-4cc2a3726f07
loglevel: INFO
name: ExampleJENKINS
nodeFilterEditable: false
plugins:
ExecutionLifecycle: null
scheduleEnabled: true
sequence:
commands:
- exec: echo "starting..."
- fileExtension: .sh
interpreterArgsQuoted: false
script: curl -vvv -X POST http://admin:11bd72f1f22653cf7158c7961f60476a1d@localhost:8080/job/MyJenkinsJob/build
scriptInterpreter: /bin/bash
keepgoing: false
strategy: node-first
uuid: 1fa2923a-5b1d-4ea2-97d1-4cc2a3726f07
Alternatively, you can use the HTTP step plugin to call your Jenkins job easily, here you can see how to install the plugin, and here I left a job definition example:
- defaultTab: nodes
description: ''
executionEnabled: true
id: 1fa2923a-5b1d-4ea2-97d1-4cc2a3726f07
loglevel: INFO
name: ExampleJENKINS
nodeFilterEditable: false
plugins:
ExecutionLifecycle: null
scheduleEnabled: true
sequence:
commands:
- exec: echo "starting..."
- configuration:
authentication: Basic
checkResponseCode: 'false'
method: POST
password: keys/jenkins_admin_token
printResponse: 'false'
printResponseToFile: 'false'
proxySettings: 'false'
remoteUrl: http://localhost:8080/job/MyJenkinsJob/build
sslVerify: 'true'
timeout: '30000'
username: admin
nodeStep: true
type: edu.ohio.ais.rundeck.HttpWorkflowNodeStepPlugin
keepgoing: false
strategy: node-first
uuid: 1fa2923a-5b1d-4ea2-97d1-4cc2a3726f07
The example uses basic authentication to pass the username and token (pulled from Rundeck Key Storage).
In both cases, the Jenkins job is launched from Rundeck.
Hope it helps!